package com.jiyun.model.xitong;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 【-announcement】实体类
 *
 * @author ???
 * @since 2024-09-26
 */
@Data
@Accessors(chain = true)
@ApiModel(description="对象")
public class Announcement implements Serializable {
    @ApiModelProperty("主键")
    @Excel(name = "id")
    private Integer id;
    @ApiModelProperty("消息标题")
    @Excel(name = "title")
    private String title;
    @ApiModelProperty("消息内容")
    @Excel(name = "content")
    private String content;
    @ApiModelProperty("发布人")
    @Excel(name = "userId")
    private Integer userId;
    @ApiModelProperty("状态")
    @Excel(name = "status")
    private Integer status;
    @ApiModelProperty("操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "operationTime")
    private LocalDateTime operationTime;
    @ApiModelProperty("发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "releaseTime")
    private LocalDate releaseTime;
    @ApiModelProperty("编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "editTime")
    private LocalDateTime editTime;
    @ApiModelProperty("接收人")
    @Excel(name = "doctorId")
    private Integer doctorId;

//    public String getStatus(){
//        return status==0?"未读":"已读";
//    }

}
